This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
RE: this is an old problem (although I thought was fixed in 6.x) ~Naomi Deskroterakol 3.Dec.03 06:48 PM a Web browser Domino Designer 6.0.2 CF2Windows 2000
Actually, that's not the *only* way around it.
I used to create a class for this kind of thing called Cache. In my cache, I set up method to retain database handles in a list. In any new class, it had a property of localCache. The Cache was passed in on the New method for all classes. That way, all open database handles were passed between all objects. Any attempt to open a database was called through a method in the cache, which added it to the list, and therefore did not open a second, locally scoped handle each time. This *significantly* improved performance on complex class structures in Lotuscript (we're talking about 30 times speed).
I don't think LS will ever be changed in such a way that you can return a document handle from a locally scoped database. You always have to have the database handle accessible either in your calling scope, or on some global level.
The easiest solution in this case is to set the database as an additional parameter to your function, so it's declared in the calling function by reference. That way, you still have the db handle scoped when the document is passed back.